const http = require('http');

const port = 10000;

// response的数据
const data = {
  'data': 'world'
};

// const sleep = (ms) => new Promise(res => setTimeout(res, ms));

const instance = http.createServer(async (req, res) => {
  res.end(JSON.stringify(data));
});

instance.listen(port, () => {
  console.log(`nginx server is on: ${port}`)
})